home *** CD-ROM | disk | FTP | other *** search
/ Power CD / Power CD ATARI-Rechner Lieben.iso / SPEZIAL / GEMVIEW / VERSION.3 / MODULS.SRC / STRCTURE / IMAGEOPT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-05  |  4.0 KB  |  84 lines

  1. /* defines for "ColorDither" structure! */
  2.  
  3. #define PROC_ORDER     0
  4. #define PROC_NEAR      1
  5. #define PROC_FLOYD     2
  6. #define PROC_JJN       3
  7. #define PROC_STUCKI    4
  8.  
  9. #define CMAP_FIX       0
  10. #define CMAP_USERDEF1  1
  11. #define CMAP_USERDEF2  2
  12. #define CMAP_OCTREEA   3
  13. #define CMAP_OCTREE    4
  14. #define CMAP_STATA     5
  15. #define CMAP_STAT      6
  16.  
  17. typedef struct {
  18.   unsigned      tocolors      : 16; /* # of color, range [4 .. 256]       */
  19.   unsigned      process       :  4; /* type of processing algorithm       */
  20.   unsigned      colormap      :  4; /* type of color computation          */
  21.   unsigned      spec_active   :  1; /* activate installed values          */
  22.   unsigned      spec_always   :  1; /* use always (also if no need)       */
  23.   unsigned      spec_grey     :  1; /* dither to greys                    */
  24.   unsigned      spec_noise    :  1; /* use noise reduction filter         */
  25.   unsigned      spec_compress :  1; /* compress colormap to used colors   */
  26.   unsigned      unused        :  3; /* for future use                     */
  27. } ColorDither;
  28.  
  29.  
  30.  
  31. /* defines for "dither" field in "ImageOptions" structure! */
  32.  
  33. #define FS_Dither      1
  34. #define JJN_Dither     2
  35. #define Stk_Dither     3
  36. #define Halftone       4
  37. #define Ordereddither  5
  38.  
  39. /* defines for "full" field in "ImageOptions" structure! */
  40.  
  41. #define FULL_NO        0
  42. #define FULL_ZOOM      1
  43. #define FULL_REPEAT    2
  44.  
  45.  
  46. typedef struct _ios{
  47.   char         *name;         /* name (path) of image to load             */
  48.   int           merged;       /* should merged to previous "image"        */
  49.   int           atx, aty;     /* location to load/merge image at          */
  50.   unsigned int  bright;       /* brightness multiplier in percentace      */
  51.   unsigned int  clipx, clipy; /* area of image to be used                 */
  52.   unsigned int  clipw, cliph; /* area of image, which is in used          */
  53.   unsigned int  last_clipx;   /* (internal) set to null                   */
  54.   unsigned int  last_clipy;   /* (internal) set to null                   */
  55.   unsigned int  last_clipw;   /* (internal) set to null                   */
  56.   unsigned int  last_cliph;   /* (internal) set to null                   */
  57.   unsigned int  dither;       /* if image is to be dithered and how       */
  58.   unsigned int  colors;       /* max # of colors to use for this image    */
  59.                               /* simple color reduction algorithm         */
  60.   int           rotate;          /* # degrees to rotate, multiple of 90      */
  61.   int           xzoom, yzoom; /* zoom promiles (1 by 1000)
  62.                                  positiv number: realtiv zoom promiles
  63.                                  negativ number: size of dest. (absolut)  */
  64.   int           align;        /* (internal) always set to 16 on ATARI     */
  65.   int           save;         /* save image using:
  66.                                  1) monochrome routine (dither if need)
  67.                                  2) color routine (color quantisation)
  68.                                  3) true color routine                    */
  69.   char         *savename;     /* name of the destination image            */
  70.   int           autoname;     /* (internal) automatical name construction */
  71.   unsigned int  full,         /* full image to area by zoom or repeatation*/
  72.                 fullw, fullh; /* full image area                          */
  73.   ColorDither   colordither;  /* see above                                */
  74.   Scaling       scalered;     /* see IMAGE.H                              */
  75.   Scaling       scalegreen;
  76.   Scaling       scaleblue;
  77.   Scaling       scaleadjust;
  78.   int           load_hexdump; /* load file as hexdump                     */
  79.   struct _ios  *prev, *next;  /* double link structure list               */
  80.   char          tc_saver   [14]; /* filename without path for saving mono */
  81.   char          color_saver[14]; /* filename of module for saving color   */
  82.   char          mono_saver [14]; /* filename of module for saving true col*/
  83. } ImageOptions;
  84.